/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.adastros.buildingmanager.model;

import javax.jdo.annotations.PersistenceCapable;
import org.apache.bval.constraints.Email;
import org.apache.bval.constraints.NotEmpty;
//import org.apache.pivot.beans.constraints.validation.Severity;

@PersistenceCapable
public class Contact {

  private Address address;
  private String cellPhone;  
  private String phoneNumber;
  
  //@Email(payload = Severity.Error.class) @NotEmpty
  private String emailAddress;

  public Contact(Address address, String phoneNumber, String cellPhone, String emailAddress) {
    this.cellPhone = cellPhone;
    this.address = address;
    this.phoneNumber = phoneNumber;
    this.emailAddress = emailAddress;
  }

  public String getCellPhone() {
    return cellPhone;
  }

  public Address getAddress() {
    return address;
  }

  public String getPhoneNumber() {
    return phoneNumber;
  }

  public String getEmailAddress() {
    return emailAddress;
  }

  /**
   * @param name the name to set
   */
  public void setCellPhone(String cellPhone) {
    this.cellPhone = cellPhone;
  }

  /**
   * @param address the address to set
   */
  public void setAddress(Address address) {
    this.address = address;
  }

  /**
   * @param phoneNumber the phoneNumber to set
   */
  public void setPhoneNumber(String phoneNumber) {
    this.phoneNumber = phoneNumber;
  }

  /**
   * @param emailAddress the emailAddress to set
   */
  public void setEmailAddress(String emailAddress) {
    this.emailAddress = emailAddress;
  }

  @Override
  public String toString() {
    return "Contact{\n" + " address=" + address + ",\n cellPhone=" + cellPhone + ",\n phoneNumber=" + phoneNumber + ",\n emailAddress=" + emailAddress + "\n}";
  }
}
